package com.ozo.cloud.manage.feign;

import com.ozo.cloud.api.manage.feign.SysRoleFeignClient;
import com.ozo.cloud.api.manage.vo.SysRoleVO;
import com.ozo.cloud.common.base.model.ResultVO;
import com.ozo.cloud.manage.service.ISysRoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 角色服务调用
 *
 * @author qiangesoft
 * @date 2024-09-11
 */
@RequiredArgsConstructor
@RestController
public class RoleFeignController implements SysRoleFeignClient {

    private final ISysRoleService sysRoleService;

    @Override
    public ResultVO<List<SysRoleVO>> listByUserId(Long userId) {
        return ResultVO.success(sysRoleService.listByUserId(userId));
    }

}
